// 收藏相关的接口函数
import request from '@/utils/http.js'

//1.添加收藏
export const addCollectAPI=(job_id,student_id)=> {
    return request({
        url: '/collect/addCollect',
        method: 'post',
        params: {
            jobId:job_id,
            studentId:student_id
        }
    })
}

//2.取消收藏
export const deleteCollectAPI=(job_id,student_id)=> {
    return request({
        url: '/collect/deleteCollect',
        method: 'post',
        params: {
            jobId:job_id,
            studentId:student_id
        }
    })
}

//3.查看是否已收藏
export const queryCollectAPI=(job_id,student_id)=> {
    return request({
        url: '/collect/queryCollect',
        method: 'post',
        params: {
            jobId:job_id,
            studentId:student_id
        }
    })
}

//4.查看收藏列表
export const pageCollectAPI=(data)=> {
    return request({
        url: '/collect/pageCollect',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
            studentId: data.studentId,
            jobIndustry: data.job_industry,
            jobLocation:data.job_address,
            searchName: data.searchName,
        }
    })
}